home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Medabots Cardz
/
Medabots CD Cardz Rokusho.bin
/
pc
/
assets
/
rokusho.dxr
/
00016_Script_16
< prev
next >
Wrap
Text File
|
2001-12-07
|
2KB
|
76 lines
property mysprite, dx, dy, direction, coldbusted, pSpeed, counter, animate
global scorez, hit, placex, missed, randomvalue
on beginsprite me
direction = "up"
pSpeed = 10
set mysprite to the spritenum of me
set dx to the locH of sprite mysprite
set dy to the locV of sprite mysprite
coldbusted = 1
counter = 0
end
on exitframe me
if coldbusted = 1 then
if animate = 1 then
if counter < 1 then
set the member of sprite mysprite to "meda22"
counter = counter + 1
else
counter = 0
animate = 2
end if
else if animate = 2 then
if counter < 1 then
set the member of sprite mysprite to "meda23"
counter = counter + 1
else
animate = 0
counter = 0
set the locH of sprite mysprite = -200
set the member of sprite mysprite to "meda21"
end if
end if
if random(randomvalue) = randomvalue then
coldbusted = 2
end if
else if coldbusted = 2 then
pSpeed = 5*random(3)
set the locV of sprite mysprite to dy
set the locH of sprite mysprite to dx
direction = "up"
coldbusted = 0
else
if direction = "up" then
set the locV of sprite mysprite to the locV of sprite mysprite - pSpeed
if the locV of sprite mysprite < dy-150 then
direction = "down"
end if
else
set the locV of sprite mysprite to the locV of sprite mysprite + pSpeed
if the locV of sprite mysprite > dy then
direction = "up"
missed = missed + 1
coldbusted = 1
end if
end if
end if
end
on mouseDown me
if coldbusted = 0 then
puppetsound "explosion"
hit = 1
animate = 1
coldbusted = 1
placex = the mouseLoc
scorez = scorez + 1
end if
end